Use u32 instead of __u32 and u8 instead of __u8 as the other types are
authorSebastian Dröge <sdroege@src.gnome.org>
Sat, 15 Dec 2007 05:01:30 +0000 (05:01 +0000)
committerSebastian Dröge <sdroege@src.gnome.org>
Sat, 15 Dec 2007 05:01:30 +0000 (05:01 +0000)
* gdk/directfb/gdkcursor-directfb.c: (gdk_cursor_new_for_display):
Use u32 instead of __u32 and u8 instead of __u8 as the other types
are deprecated since DirectFB 1.0.0. If compiling with an older
version define the new type name to the old types. Fixes bug #503190.

svn path=/trunk/; revision=19182

ChangeLog
gdk/directfb/gdkcursor-directfb.c

index d908dc1f8a13363c6076a53ee51a3ddf74d53f25..abe3b4159407cbacfd36e56270f735d2d990038f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-12-15  Sebastian Dröge  <slomo@circular-chaos.org>
+
+       * gdk/directfb/gdkcursor-directfb.c: (gdk_cursor_new_for_display):
+       Use u32 instead of __u32 and u8 instead of __u8 as the other types
+       are deprecated since DirectFB 1.0.0. If compiling with an older
+       version define the new type name to the old types. Fixes bug #503190.
+
 2007-12-14  Ray Strode  <rstrode@redhat.com>
 
        * gtk/gtkwidget.c: Suggest g_signal_connect (..., "realize", ...)
index 8ab7aec7b8b00a8648e20064609182d3d8595e21..5c2f92ea2619f42261b96d86c2d4d9212403553f 100644 (file)
 
 #include "x-cursors.xbm"
 
+#include <directfb_version.h>
+
+#if DIRECTFB_MAJOR_VERSION < 1
+#define u32 __u32
+#define u8 __u8
+#endif
+
 static struct {
   const guchar *bits;
   int width, height, hotx, hoty;
@@ -228,7 +235,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,GdkCursorType cursor_type)
         }
       else
         {
-          __u32  *dst;
+          u32  *dst;
           int     pitch;
 
           ret = temp->Lock (temp, DSLF_WRITE, (void**)&dst, &pitch);
@@ -266,13 +273,13 @@ gdk_cursor_new_for_display (GdkDisplay *display,GdkCursorType cursor_type)
                       gint  bit = x-mx + (y-my) * p;
                       gint mbit =    x +     y  * mp;
 
-                      __u32 color = (x-mx < 0  ||  y-my < 0  ||
+                      u32 color = (x-mx < 0  ||  y-my < 0  ||
                                      x-mx >= stock_cursors[cursor_type].width  ||
                                      y-my >= stock_cursors[cursor_type].height)
                         ? 0x00FFFFFF : (src[bit/8] & (1 << bit%8) ? 0 : 0x00FFFFFF);
 
-                     __u8  a     = color ? 0xE0 : 0xFF;
-                      __u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
+                     u8  a     = color ? 0xE0 : 0xFF;
+                      u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
 
                       dst[x + y*pitch] = alpha | color;
                     }